1. Technical Field
The present invention relates to a controller that intervenes between an application program (“application” below) and a device driver, and to a method of controlling the controller.
2. Related Art
In order to control a device, such as a printer, that is connected to a computer, a device driver for that device is generally used. See, for example, Japanese Unexamined Patent Appl. Pub. JP-A-H11-265267. Such device drivers are for controlling the corresponding device, and provide an input/output interface with multiple control options (referred to as simply “interface” below). By using the interface provided by the device driver when developing an application, device operations can be controlled and error handling processes can be written according to the state of the device.
In order to control such a device, however, an extremely large number of functions for controlling the device and numerous processes for handling errors caused by the device are generally required in the device driver interface. As a result, using a device driver to enable detailed device control and handle errors complicates the flow of application processes. Application development costs increase as a result.
Batch processing, for example, is also conceivable as a means of avoiding complicating the flow of application processes. More specifically, an error handling process that always simply reinitializes all functions of the device driver can be used to recover from an error without considering the possible causes of the error or the state of the device or device driver when an error occurs. However, because reinitializing all functions of the device driver is generally time-consuming, executing the re-initialization process every time an error occurs can reduce the performance of the device driver.